#!/bin/bash

strDate=`date +%s`

fileName="log_file_"${strDate}".txt"


echo $fileName

echo "test string" > "/home/hcgy/Documents/esm6800h/"$fileName
# sleep 1

echo $fileName

fileExist=1

while [ $fileExist -eq 1 ]
do
if [ -f $fileName ]; then
    echo "log file exist"
    strDate=`date +%s`
    fileName="log_file_"${strDate}".txt"
    fileExist=1
else
    echo "log file is not exist"
    fileExist=0
fi

done



